package com.gxuwz.dsj.Controller;


import com.gxuwz.dsj.Bean.ResultEntity;
import com.gxuwz.dsj.Bean.SysMenu;
import com.gxuwz.dsj.mapper.SysMenuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.sql.DataSource;
import java.util.List;

@Controller
public class SysMenuController {

//    @Autowired
//    private JdbcTemplate jdbcTemplate;
//
//    @Autowired
//    private DataSource dataSource;

    @Autowired
    private SysMenuMapper sysMenuMapper;


    @RequestMapping("/sys/menu")
    @ResponseBody
    public List<SysMenu> getSysMenu(){
        List<SysMenu> sysMenu = sysMenuMapper.getSysMenu();

        return sysMenu;

    }



}
